# -*- coding: utf-8 -*-
# @File    : App.__init__.py

from fastapi import FastAPI
from .routers import items, admin, index
from .ext import SessionConfig


def create_app():
    app = FastAPI()

    # 添加路由和中间件等
    app.include_router(items.router)  # 添加items路由
    app.include_router(admin.router)  # 添加admin路由
    app.include_router(index.router)  # 添加index路由
    SessionConfig(app)  # 添加session配置

    return app
